package com.hgxd.entity.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.hgxd.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 系统用户
 * </p>
 *
 * @author fsd
 * @since 2023-10-18
 */
@Getter
@Setter
@TableName("sys_user")
@ApiModel(value = "SysUser对象", description = "系统用户")
public class SysUser extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;
//    @ApiModelProperty("角色名称")
//    private String roleName;

    @ApiModelProperty(value = "用户id")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;

    @ApiModelProperty(value = "用户名",required = true)
    private String username;

    @ApiModelProperty(value = "密码",required = true)
    private String password;

    @ApiModelProperty(value = "盐",required = true)
    private String salt;

    @ApiModelProperty("姓名")
    private String name;

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("头像地址")
    private String headUrl;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty(value = "状态  0：禁用   1：正常",required = true)
    private Integer status;

    @ApiModelProperty("创建者ID")
    private Long createUserId;

    @TableField(exist = false)
    List<String> userPermsList;

    @TableField(exist = false)
    private List<SysMenu> menuList;

    @TableField(exist = false)
    private List<String> role = new ArrayList<>();
}
